<div  class="CartWrap" style="float:none;">
<form id="f_order_pay" target="_blank" action="<{link app=b2c ctl='site_paycenter' act='dopayment' arg0='order'}>" method="post">
<input type="hidden" name="payment[order_id]" value="<{$order.order_id}>" />
<input type="hidden" name="payment[money]" value="<{$order.total_amount-$order.payed}>" id="hidden_money"/>
<input type="hidden" name="payment[currency]" value="<{$order.currency}>" />
<input type="hidden" name="payment[cur_money]" value="<{$order.cur_money}>" id="hidden_cur_money"/>
<input type="hidden" name="payment[cur_rate]" value="<{$order.cur_rate}>" />
<input type="hidden" name="payment[cur_def]" value="<{$order.cur_def}>" />
<input type="hidden" name="payment[cost_payment]" value="<{$order.payinfo.cost_payment}>" />
<input type="hidden" name="payment[cur_amount]" value="<{$order.cur_amount}>" />
<input type="hidden" name="payment[memo]" value="<{$order.memo}>" />
<!--<input type="hidden" name="payment[return_url]" value="<{$return_url}>" />-->
 <div class="CartNav clearfix" style="margin:8px 0">
      <div class="step stepbj3"><span class="step1"><{t}>购物车<{/t}></span><span class="step2"><{t}>填写订单并确认<{/t}></span><span class="step3"><{t}>成功提交订单<{/t}></span><span class="mycart"><{t}>我的购物车<{/t}></span></div>
</div>
<div>
<div class="division">
<table>
<tr>
<td class="order-sucs" style="width:120px"><td>
<td style="width:700px">
  <div  style='padding:10px'>
  <ul>
  <li><strong class="font16px"><{t}>订单已经成功提交!<{/t}></strong></li>
  <li> <span><{t}>订单编号：<{/t}></span><font size="2.5"><b><{$order.order_id}></b></font>&nbsp;&nbsp;
     <span><{t}>订单金额:<{/t}></span><font class="point" id="span_amount"><{$order.total_amount|cur:$order.currency}></font></li>
     <li><a style="color:#09C" href="<{link app=b2c ctl=site_order act=detail arg0=$order.order_id}>" ></font><{t}>查看订单详细信息>><{/t}></a></li>
  </ul>
  </div>
  </td></tr>
  </table>
  </div>
  
  <{if !$order.selecttype}>
  <div class="division">
  <h4 class="title-bg"><{t}>订单支付<{/t}></h4>
  <table width="100%" class="tableform">
  <tr>
	<th><strong class="font14px"><{$order.payinfo.pay_name}></strong></th>
	<td><a href='<{link app=b2c ctl="site_order" act="index" arg0=$order.order_id arg1='true'}>' ><{t}>更改支付方式<{/t}>>></a><{if $order.payinfo.pay_des != '&nbsp;'}><br /><{/if}><{$order.payinfo.pay_des}></td>
	</tr>
  </table>
  <div style="border-top:1px dashed #ddd; padding:10px 35px">
  <ul>
  <{if $order.payinfo.pay_app_id}>
  <li>
  <{t}>确认付款请去<strong>订单详情</strong>页面去提交付款信息<{/t}></li>
  <{/if}>
  <li>
  <{t}>支付成功后，可以在<{/t}>&nbsp;<a href="<{link app=b2c ctl="site_member" act="index"}>"><{t}>会员中心<{/t}></a><{t}> 的<{/t}> <a href="<{link app=b2c ctl="site_member" act="orders"}>"><{t}>我的订单<{/t}></a> <{t}>处查看订单和追踪订单状态<{/t}></li>
 <{if $order.payinfo.pay_app_id != -1 && $order.payinfo.pay_app_id != 'offline'}>
 <li><p style="padding:10px 0"> <button type="submit" class=" btn order-btn btn-has-icon" > <span><span> <{t}>支付<{/t}><i class="btn-icon"> <img src='<{$res_url}>/bundle/order.png'/></i></span></span> </button></p>
  </li>       
<{/if}> 
  </ul>
  </div> 
   
  </div>
<{/if}>
  
  <{if $order.selecttype}>
  <div class="division">
    <div class='select-paymethod '>
        <{if $payments}>
        <div id="_normal_payment" style=" background:#F7F7F9; padding:15px"> 
        <div style="padding:0 8px"><{t}>已选择的支付方式<{/t}><br /><{t}>现修改为：<{/t}></div>
            <{foreach from=$payments item=item key=key}>
                <ul>
                    <li>
                        <label><input type="radio" onclick="Order.paymentChange(this)" formatmoney="<{$order.cur_def}><{$item.cur_money}>" curmoney="<{$item.cur_money}>" moneyamount="<{$item.total_amount}>"<{if $order.payinfo.pay_app_id == $item.app_id}> checked="checked"<{/if}> value="<{$item.app_id}>" paytype="<{$item.app_id}>" name="payment[pay_app_id]" class="x-payMethod" style="cursor: pointer;"><{$item.app_name}></label> 
                    <{$item.app_des}></li>
                </ul>
            <{/foreach}>
        </div>
        <{/if}>
    </div>
  <div class="textcenter" style="padding:10px; border-top:1px  dashed #ccc">
   <input type="submit" class='actbtn btn-pay' value="<{t}>支付<{/t}>" />
  </div></div>
<{else}>
  <input type="hidden" name="payment[pay_app_id]" value="<{$order.payinfo.pay_app_id}>" />
  <{if $extendInfo}>
      <div class='division paymethodextendInfo'>
      <{foreach from=$extendInfo item=item key=key}>
        <{if $item.type=='select'}>
            <select name=<{$key}>>
                <{foreach from=$item.value item=vitem key=vkey}>
                    <option value="<{$vitem.value}>" <{if $vitem.checked}>selected<{/if}>><{$vitem.name}></option>
                <{/foreach}>
            </select>
        <{else}>
            <{foreach  from=$item.value item=vitem key=vkey}>
                <{if $item.type=='radio'}>
                    <input <{$vitem.checked}> type='radio' name=<{$key}> value=<{$vitem.value}>><{if $vitem.imgname}><{$vitem.imgname}><{else}><{$vitem.name}><{/if}></if>
                <{else if $item.type=='checkbox'}>
                    <input <{$vitem.checked}> type='checkbox' name="<{$key}>[]" value=<{$vitem.value}>><{if $vitem.imgname}><{$vitem.imgname}><{else}><{$vitem.name}><{/if}></if>
                <{/if}>
            <{/foreach}>
        <{/if}>
      <{/foreach}>
      </div>
  <{/if}>
  
    

<{/if}>
  
  </div>
</div>

</form>
<script>
        void function(){
        var form= $('f_order_pay');
            Order ={
                
                paymentChange:function(target){
                         if(!target)return;
                         target = $(target);
                     var money  = target.get('moneyamount');
					 var cur_money = target.get('curmoney');
                     var fmoney = target.get('formatmoney');
                     var paytype= target.get('paytype');
                     
                     $('hidden_money').set('value',money);
                     $('hidden_cur_money').set('value',cur_money);
                     $('span_amount').set('text',fmoney);
                     form.getElement('input[type=submit]').set('value',paytype!='offline'?'<{t}>立即付款<{/t}>':'<{t}>确定<{/t}>');
                     
                     form.getElement('input[type=submit]')[(paytype=='offline'?'addClass':'removeClass')]('btn-pay-ok');
                     /* $$('#_normal_payment th .ExtendCon input[type=radio]').fireEvent('checkedchange');*/
                }
            
            };
            
            if($E('#f_order_pay .select-paymethod')){
                Order.paymentChange($E('#f_order_pay .select-paymethod input[checked]'));
                
                if(form&&form.getElement('input[type=submit]')){
                    form.getElement('input[type=submit]').addEvent('click',function(e){
                        
                        if(!$E('#f_order_pay .select-paymethod input[checked]')){
                        MessageBox.error('<{t}>请选择支付方式<{/t}>');
                        return e.stop();
                        }
                    
                    });
                }
            }
        }();
</script>
